$().ready(function () {
// 在键盘按下并释放及提交后验证提交表单
    // 登录和产品添加
    $("#my_form").validate({
        rules: {
            username: {
                required: true,
                minlength: 3,
                maxlength: 16
            },
            password: {
                required: true,
                minlength: 3,
                maxlength: 16
            }
        },
        messages: {
            username: {
                required: "请输入用户名",
                minlength: "用户名长度太短",
                maxlength: "用户名最长不超过16个字符"
            },
            password: {
                required: "请输入密码",
                minlength: "用户名长度太短",
                maxlength: "密码最长不超过16个字符"
            }

        }
    })
});